package com.hnchances.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;


@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="User对象", description="")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户名")
    @TableField("userName")
    private String username;

    @ApiModelProperty(value = "密码，md5")
    @TableField("passWord")
    private String password;

    @ApiModelProperty(value = "电话号码11位")
    private String phone;

    @ApiModelProperty(value = "真实姓名")
    @TableField("trueName")
    private String truename;

    @ApiModelProperty(value = "0-学生，1-老师，2-领导或管理（可看所有班级）")
    private Integer identity;

    @ApiModelProperty(value = "课程关联id")
    @TableField("courseID")
    private Integer courseid;

    @ApiModelProperty(value = "班级关联id")
    @TableField("classID")
    private Integer classid;

    @ApiModelProperty(value = "学生关联id")
    @TableField("studentId")
    private Integer studentid;

    @ApiModelProperty(value = "注册日期")
    @TableField("creatDateTime")
    private Date creatdatetime;

    @ApiModelProperty(value = "修改日期")
    @TableField("updateDateTime")
    private Date updatedatetime;

    @ApiModelProperty(value = "最后登录时间")
    @TableField("lastLoginDateTime")
    private Date lastlogindatetime;

    @ApiModelProperty(value = "ipv4")
    @TableField("loginIP")
    private String loginip;

    @ApiModelProperty(value = "0-正常 1-删除")
    private Integer status;

    @ApiModelProperty(value = "0-未审核 1-已审核")
    private Integer verify;

    @TableField(exist = false)
    private String idcard;

    @TableField(exist = false)
    private String code;

    public String toStringInfo() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", phone='" + phone + '\'' +
                ", truename='" + truename + '\'' +
                ", identity=" + identity +
                ", courseid=" + courseid +
                ", classid=" + classid +
                ", studentid=" + studentid +
                ", creatdatetime=" + creatdatetime +
                ", updatedatetime=" + updatedatetime +
                ", lastlogindatetime=" + lastlogindatetime +
                ", loginip='" + loginip + '\'' +
                ", status=" + status +
                ", verify=" + verify +
                ", idcard='" + idcard + '\'' +
                ", code='" + code + '\'' +
                '}';
    }
}
